package com.beans;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.FactoryBean;

public class factoryBean{
	private  Map<String, Car> car = null;

	public factoryBean() {
		car = new HashMap<String, Car>();
		car.put("wwj1", new Car("wwj", 12, 1342722212));
		car.put("wwj2", new Car("lhm", 11, 1342722043));
	}
	public  Car getCar(String name) {
		return car.get(name);
	}
	
	
	
//	private static Map<String, Car> car = new HashMap<String, Car>();
//	static {
//		car.put("wwj1", new Car("wwj", 12, 1342722212));
//		car.put("wwj2", new Car("lhm", 11, 1342722043));
//	}
//	public static Car getCar(String name) {
//		return car.get(name);
//	}
}
